@include('admin\header')
<!-- iCheck-->
<link rel="stylesheet" href="{{asset('admin/plugins/icheck/css/_all.css')}}">
<!-- Fonts -->
<!-- <link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,900,300italic,400italic,600italic,700italic,900italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'> -->
<!-- Feature detection -->
<script src="{{asset('admin/js/modernizr-2.6.2.min.js')}}"></script>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="admin/js/html5shiv.js"></script>
<script src="admin/js/respond.min.js"></script>
<link rel="stylesheet" href="assets/plugins/bootstrap-wysihtml5/css/bootstrap-wysihtml5.css">
<![endif]-->
</head>

<body>
<section id="container">
@include('admin\nav')
@include('admin\laside')
<!--main content start-->
    <section class="main-content-wrapper">
        <section id="main-content">
            <div class="row">
                <div class="col-md-12">
                    <!--breadcrumbs start -->
                    <ul class="breadcrumb">
                        <li><a href="#">Dashboard</a>
                        </li>
                        <li>Forms</li>
                        <li class="active">Form Validation</li>
                    </ul>
                    <!--breadcrumbs end -->
                    <h1 class="h1">修改商品</h1>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">修改商品详细信息</h3>
                            <div class="actions pull-right">
                                <i class="fa fa-chevron-down"></i>
                                <i class="fa fa-times"></i>
                            </div>
                        </div>
                        <div class="panel-body">

                            <form action="" method="post"  class="form-horizontal form-border" id="form" enctype="multipart/form-data">
                                {{csrf_field()}}

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">商品名称</label>
                                    <div class="col-sm-6">
                                        <input type="text" class="form-control" name="goods_name" id="input1" required="" placeholder="输入商品名称" value="{{$goodsfind->goods_name}}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">商品栏目</label>
                                    <div class="col-sm-6">
                                        <select name="nanmu" id="" placeholder="选择所属商品栏目">
                                            <option value="daxue"> 栏目一 </option>
                                            <option value="gaozhong"> 栏目二 </option>
                                            <option value="chuzhong"> 栏目三 </option>
                                        </select>

                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">商品编号</label>
                                    <div class="col-sm-6">
                                        <input type="text" class="form-control" required="" name="goods_sn" id="input3" placeholder="你的商品编号" value="{{$goodsfind->goods_sn}}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">商品市场价格</label>
                                    <div class="col-sm-6">
                                        <input type="text" class="form-control" required="" name="market_price" id="input4" placeholder="商品的正常的市场价格" value="{{$goodsfind->market_price}}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">商品活动价格</label>
                                    <div class="col-sm-6">
                                        <input type="text" class="form-control" required="" name="shop_price" id="input5" placeholder="商品活动价格" value="{{$goodsfind->shop_price}}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">打几折</label>
                                    <div class="col-sm-6">
                                        <input type="text" class="form-control " required="" name="dazhe" id="input6" placeholder="折扣1~10">
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label class="col-sm-3 control-label">商品图片上传</label>
                                    <div class="col-sm-6">
                                        <input type="file" name="shop_img" id="input5" required="">
                                    </div>
                                    <!--<div class="col-sm-3">
                                        <input type="password" class="form-control " name="input7" id="input7" required="" placeholder="Password">
                                    </div>
                                    <div class="col-sm-3">
                                        <input type="password" class="form-control " required="" name="input8" id="input8" placeholder="Re-Type Password">
                                    </div>-->
                                </div>








                                <div class="form-group">
                                    <label class="col-sm-3 control-label">商品详情</label>
                                    <div class="col-sm-6">
                                        <div class="panel panel-default">
                                            <div class="panel-heading">
                                                <h3 class="panel-title">商品编辑</h3>
                                                <div class="actions pull-right">
                                                    <i class="fa fa-chevron-down"></i>
                                                    <i class="fa fa-times"></i>
                                                </div>
                                            </div>
                                            <div class="panel-body">
                                <textarea name="shop_describe" id="editor1" rows="10" cols="80">
                                    {{$goodsfind->shop_describe}}
                                </textarea>
                                            </div>
                                        </div>


                                    </div>
                                </div>

                                {{--<div class="form-group">
                                    <label class="col-sm-3 control-label">URL</label>
                                    <div class="col-sm-6">
                                        <input type="url" class="form-control " name="input10" id="input10" required="" placeholder="URL">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">Number</label>
                                    <div class="col-sm-6">
                                        <input type="text" class="form-control " name="input11" id="input11" required="" placeholder="Enter only numbers">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">Phone</label>
                                    <div class="col-sm-6">
                                        <input type="text" class="form-control" name="input12" id="input12" required="" placeholder="(XXX) XXXX XXX">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">Textarea</label>
                                    <div class="col-sm-6">
                                        <textarea class="form-control" name="input13" id="input13" placeholder="Min 5 chars."></textarea>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">文件上传</label>
                                    <div class="col-sm-6">
                                        <input type="text" class="form-control" name="pic" id="input14" placeholder="Min 5 chars.">
                                    </div>
                                </div>--}}

                                <div class="form-group">
                                    <div class="col-sm-offset-8">
                                        <button type="submit" class="btn btn-primary">发布商品</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </section>
    <!--main content end-->
    @include('admin\raside')
</section>
<script src="{{asset('admin/js/jquery-1.10.2.min.js')}}"></script>
<script src="{{asset('admin/plugins/bootstrap/js/bootstrap.min.js')}}"></script>
<script src="{{asset('admin/plugins/waypoints/waypoints.min.js')}}"></script>
<script src="{{asset('admin/js/application.js')}}"></script>
<!--Page Level JS-->
<script src="{{asset('admin/plugins/icheck/js/icheck.min.js')}}"></script>
<script src="{{asset('admin/plugins/validation/js/jquery.validate.min.js')}}"></script>
<script src="{{asset('admin/plugins/validation/js/jquery.validate.min.js')}}"></script>

<script src="{{asset('admin/plugins/bootstrap-wysihtml5/js/wysihtml5-0.3.0.js')}}"></script>

<script src="{{asset('admin/plugins/bootstrap-wysihtml5/js/bootstrap3-wysihtml5.js')}}"></script>
<script src="{{asset('admin/plugins/ckeditor/ckeditor.js')}}"></script>

<script>
    $(document).ready(function() {
        $('.textarea').wysihtml5();

        CKEDITOR.replace('editor1');
    });
</script>
<script>
    $(document).ready(function() {
        $('#form').validate({
            rules: {
                input1: {
                    required: true
                },
                input2: {
                    minlength: 12,
                    required: true
                },
                input3: {
                    maxlength: 13,
                    required: true
                },
                input4: {
                    required: true,
                    numeric:true,
                    /*minlength: 4,
                     maxlength: 8*/
                },
                input5: {
                    required: true,
                    numeric:true,
                    /*min: 5*/
                },
                input6: {
                    required: true,
                    range: [1, 10]
                },
                input7: {
                    minlength: 5
                },
                input8: {
                    required: true,
                    minlength: 5,
                    equalTo: "#input7"
                },
                input9: {
                    required: true,
                    email: true
                },
                input10: {
                    required: true,
                    url: true
                },
                input11: {
                    required: true,
                    digits: true
                },
                input12: {
                    required: true,
                    phoneUS: true
                },
                input13: {
                    required: true,
                    minlength: 5
                }
            },
            highlight: function(element) {
                $(element).closest('.form-group').removeClass('success').addClass('error');
            },
            success: function(element) {
                element.text('OK!').addClass('valid')
                        .closest('.form-group').removeClass('error').addClass('success');
            }
        });
    });
</script>

</body>

</html>
